import request from '@/utils/request'
import qs from "querystring"
export default{
    //分页查询
    getPageFinds(pageNum,pageSize,sort){
        return request({
            url:"/api-operate/rebate/getPageFind",
            method:"get",
            params:{
                pageNum,
                pageSize,
                sort
            }
        })
    },

    //筛选查询
    getFindScreenList(pageNum,pageSize,sort,title,startTime){
        return request({
            url:"/api-operate/rebate/getFindScreen",
            method:"get",
            params:{
                pageNum,
                pageSize,
                sort,
                title,
                startTime
            }
        })
    },

    //修改满减
    getUpdateRebateList(dto){
        var data=qs.stringify(dto)
        return request({
            url:"/api-operate/rebate/getUpdateRebate",
            method:"post",
            data
        })
    },

    //满减添加
    getSaveRebate(rebDiscounts,rebate,reLink,aGoods,aBrands){
        var data=qs.stringify({rebDiscounts,rebate,reLink,aGoods,aBrands})
        return request({
            url:"/api-operate/rebate/getSaveRebate",
            method:"post",
            data
        })
    },

    //删除列表信息
    getDeleteRebate(ids){
        var data=qs.stringify({ids})
        return request({
            url:"/api-operate/rebate/getDeleteRebate",
            method:"delete",
            data
        })
    }
}